package com.example.demo.pattern.singletonpattern;

public class Sin {
    public String string;

    private volatile static Sin sin;

    private Sin() {
    }

    public static Sin getInstance() {
        if (sin == null) {
            synchronized (Sin.class) {
                if (sin == null) {
                    sin = new Sin();
                }
            }
        }
        return sin;
    }
}
